Component({
  properties: {
    cpnlist:{
      type:[],
      value:null
    }
  },
  methods:{
    handleCancle(){
      this.triggerEvent('pagecompleteCancle',{},{})
    },
    handleDetail(e){
      this.triggerEvent('pagehandledetail', {cpn_translist_id: e.currentTarget.dataset.translist_id, foodid: e.currentTarget.dataset.foodid}, {})
    },
    handleReducenum(e){
      // this.triggerEvent('pagehandleReduce',{cpnreduceid:this.data.cpnlist[e.currentTarget.dataset.cpnreduce].food_id},{})
      this.triggerEvent('pagehandleReduce',{cpnreduceid:e.currentTarget.dataset.cpnreduce},{})
    },
    handleAddnum(e){
      // console.log(this.data.cpnlist);
      // this.triggerEvent('pagehandleAdd',{cpnaddid:this.data.cpnlist[e.currentTarget.dataset.cpnadd].food_id},{})
      this.triggerEvent('pagehandleAdd',{cpnaddid:e.currentTarget.dataset.cpnadd},{})
    }
  }
})
